package com.zx.zxapibackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zx.zxapibackend.model.domain.InterfaceCharging;
import com.zx.zxapicommon.common.BaseResponse;
import com.zx.zxapicommon.model.vo.LockChargingVo;

/**
* @author Bro
* @description 针对表【interface_charging】的数据库操作Service
* @createDate 2023-07-18 11:03:05
*/
public interface InterfaceChargingService extends IService<InterfaceCharging> {

    /**
     * 获取当前最新剩余库存
     * @param interfaceId
     * @return
     */
    BaseResponse getPresentAvailablePieces(Long interfaceId);

    /**
     * 更新接口剩余库存
     * 锁定库存
     * @param lockChargingVo
     * @return
     */
    BaseResponse updateAvailablePieces(LockChargingVo lockChargingVo);
    /**
     * 更新接口剩余库存
     * 释放库存
     * @param lockChargingVo
     * @return
     */
    BaseResponse unlockAvailablePieces(LockChargingVo lockChargingVo);
}
